"""
@Author: CheyenneLam
@Date: 2020-12-16 10:31:00
@LastEditTime: 2020-12-16 10:31:00
@LastEditors: CheyenneLam
@Description: acm信息
@FilePath: \Main\\acm_handle.py
"""
from conf.var_set import *


class Info(object):
    namespace = NAMESPACE

    def __init__(self, data_id, group, namespace=None):
        self.data_id = data_id
        self.group = group
        if namespace is not None:
            self.namespace = NAMESPACE

    def get_config(self, c):
        try:
            content = c.get(self.data_id, self.group)
            return content
        except Exception as e:
            print("[get-config]failed [%s] for data_id:%s, group:%s, namespace:%s" % (
                str(e), self.data_id, self.group, self.namespace))